//
//  XiaoFeiSQCell02.m
//  PosApp
//
//  Created by 刘萍 on 2018/8/31.
//  Copyright © 2018年 李英新. All rights reserved.
//

#import "XiaoFeiSQCell02.h"

@implementation XiaoFeiSQCell02

- (void)setModel:(PosModel *)model {
    self.XFPresonLabel.text = [NSString stringWithFormat:@"%@",model.pos_receive];
    [self.XFPosImage sd_setImageWithURL:[NSURL URLWithString:model.pos_pic] placeholderImage:[UIImage imageNamed:@"MainZWImage"]];
    NSString * str = @"%";
    if ([model.pos_three isEqual:@"1"]) {
        self.XFLabel01.text = [NSString stringWithFormat:@"%@%@+3元/笔",model.pos_rate,str];
    }else{
        self.XFLabel01.text = [NSString stringWithFormat:@"%@%@/笔",model.pos_rate,str];
    }
    
    if ([model.pos_md isEqual:@"1"]) {
        self.XFShowImage.hidden = NO;
        self.XFShowLabel.hidden = NO;
    }else{
        self.XFShowImage.hidden = YES;
        self.XFShowLabel.hidden = YES;
    }
    self.XFLabel02.text = [NSString stringWithFormat:@"%@%@",model.pos_vipreturn,str];
    self.XFLabel03.text = [NSString stringWithFormat:@"%@%@",model.pos_return,str];
    
    self.XFLabel02.hidden = YES;
    self.XFLabel03.text = [NSString stringWithFormat:@"%@%@",model.pos_vipreturn,str];
    
    
    if ( model.pos_return.floatValue > 0) {
        [self.LBLPuTongRate setHidden:NO];
        [self.LBLPuTongTips setHidden:NO];
        [self.LBLRed setHidden:NO];
        self.LBLPuTongRate.text = [NSString stringWithFormat:@"%@%@",model.pos_return,str];
        
    }else{
        [self.LBLPuTongRate setHidden:YES];
        [self.LBLPuTongTips setHidden:YES];
        [self.LBLRed setHidden:YES];
    }
}

- (void)CreateXiaoFeiSQCell02{
    self.XFBackView.layer.cornerRadius = 5;
    self.XFBackView.layer.shadowColor = [UIColor colorWithRed:207/255.0 green:207/255.0 blue:207/255.0 alpha:1].CGColor;//shadowColor阴影颜色
    self.XFBackView.layer.shadowOffset = CGSizeMake(0,1);//shadowOffset阴影偏移,x向右偏移4，y向下偏移4，默认(0, -3),这个跟shadowRadius配合使用
    self.XFBackView.layer.shadowOpacity = 0.8;//阴影透明度，默认0
    self.XFBackView.layer.shadowRadius = 3;//阴影半径，默认3
    
}
- (IBAction)ClickOnBtnOfXiaoFeiSQCell02:(id)sender {
    [self.delegate ClickOnBtnFromXiaoFeiSQCell02ToLookNewsWithCellID:self.tag];
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

@end
